package com.pfzy.lib.sdk.utils.zip;

import java.io.RandomAccessFile;

/**
 * 数据源
 */
abstract class DataSources {
    private DataSources() {
    }

    /**
     * 作为数据源
     * @param file
     * @param offset
     * @param size
     * @return
     */
    public static DataSource asDataSource(RandomAccessFile file, long offset, long size) {
        if (file == null) {
            throw new NullPointerException();
        }
        return new RandomAccessFileDataSource(file, offset, size);
    }
}
